﻿<%@ Page Title="" Language="C#" Theme="Default_Themes" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ChuongTrinhDaoTao.aspx.cs" Inherits="DanhMuc_ChuongTrinhDaoTao" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:UpdatePanel ID="udt1" runat="server">
        <ContentTemplate>
            <div class="row-fluid">
                <div class="span12">
                    <div class="box" >
                        <div class="box-title">
                            <h3><i class="icon-file"></i>Quản lý chương trình đào tạo</h3>
                            <div class="box-tool">
                                <a data-action="collapse" href="#"><i class="icon-chevron-up"></i></a>
                                <a data-action="close" href="#"><i class="icon-remove"></i></a>
                            </div>
                        </div>
                        <div class="box-content">
                            <div class="control-group info">
                                <label class="control-label" style="width:150px;padding-right:10px;">Tên chương trình đào</label>
                                <div class="controls">
                                    <asp:DropDownList ID="drlTenLop" runat="server" CssClass="span5" Height="33px" Width="326px"></asp:DropDownList>
                                </div>
                                <div style="height:5px;"></div>
                                <label class="control-label" style="width:150px;padding-right:10px;">Thời gian đào tạo từ</label>
                                <div class="controls">
                                    <asp:TextBox BorderStyle="Solid" AutoPostBack="true" OnTextChanged="txttungay_TextChanged" placeholder="Ngày/tháng/năm" BorderColor="#3A87AD" BorderWidth="1px" ID="txttungay" runat="server" class="span2"></asp:TextBox>
                                    <asp:ImageButton runat="Server" ID="Image1" ImageUrl="~/css/icons/lich.gif" AlternateText="Click to show calendar" />
                                    <ajaxToolkit:CalendarExtender ID="calendarButtonExtender2" runat="server" TargetControlID="txttungay" PopupButtonID="Image1" Format="dd/MM/yyyy" />
                                    <ajaxToolkit:MaskedEditExtender ID="txttungay_MaskedEditExtender" MaskType="Date" runat="server" Mask="99/99/9999" TargetControlID="txttungay"></ajaxToolkit:MaskedEditExtender>
                                    Đến ngày &nbsp;&nbsp;
                                    <asp:TextBox BorderStyle="Solid" AutoPostBack="true" OnTextChanged="txttungay_TextChanged" placeholder="Ngày/tháng/năm" BorderColor="#3A87AD" BorderWidth="1px" ID="txtdenngay" runat="server" class="span2"></asp:TextBox>
                                    <asp:ImageButton runat="Server" ID="Image2" ImageUrl="~/css/icons/lich.gif" AlternateText="Click to show calendar" />
                                    <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtdenngay" PopupButtonID="Image2" Format="dd/MM/yyyy" />
                                    <ajaxToolkit:MaskedEditExtender ID="txtdenngay_MaskedEditExtender" MaskType="Date" runat="server" Mask="99/99/9999" TargetControlID="txtdenngay"></ajaxToolkit:MaskedEditExtender>
                                </div>
                                <div style="height:5px;"></div>
                                <label class="control-label" style="width:150px;padding-right:10px;">Ngày khai giảng</label>
                                <div class="controls">
                                    <asp:TextBox BorderStyle="Solid" AutoPostBack="true" OnTextChanged="txttungay_TextChanged" placeholder="Ngày/tháng/năm" BorderColor="#3A87AD" BorderWidth="1px" ID="txtNgayKhaiGiang" runat="server" class="span2"></asp:TextBox>
                                    <asp:ImageButton runat="Server" ID="Image3" ImageUrl="~/css/icons/lich.gif" AlternateText="Click to show calendar" />
                                    <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtNgayKhaiGiang" PopupButtonID="Image3" Format="dd/MM/yyyy" />
                                    <ajaxToolkit:MaskedEditExtender ID="txtNgayKhaiGiang_MaskedEditExtender" MaskType="Date" runat="server" Mask="99/99/9999" TargetControlID="txtNgayKhaiGiang"></ajaxToolkit:MaskedEditExtender>
                                </div>
                                <div style="height:5px;"></div>
                                <label class="control-label" style="width:150px;padding-right:10px;">Ngày hết hạn đăng ký</label>
                                <div class="controls">
                                    <asp:TextBox BorderStyle="Solid" AutoPostBack="true" OnTextChanged="txttungay_TextChanged" placeholder="Ngày/tháng/năm" BorderColor="#3A87AD" BorderWidth="1px" ID="txtNgayHetHanDangKy" runat="server" class="span2"></asp:TextBox>
                                    <asp:ImageButton runat="Server" ID="Image4" ImageUrl="~/css/icons/lich.gif" AlternateText="Click to show calendar" />
                                    <ajaxToolkit:CalendarExtender ID="CalendarExtender3" runat="server" TargetControlID="txtNgayHetHanDangKy" PopupButtonID="Image4" Format="dd/MM/yyyy" />
                                    <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" MaskType="Date" runat="server" Mask="99/99/9999" TargetControlID="txtNgayHetHanDangKy"></ajaxToolkit:MaskedEditExtender>
                                </div>
                                <div style="height:5px;"></div>
                                <label class="control-label" style="width:150px;padding-right:10px;">Đối tượng tham gia</label>
                                <div class="controls control-group">
                                    <label class="checkbox inline">
                                    <asp:CheckBox ID="chkcosodoan" ToolTip="CSD" runat="server" AutoPostBack="true" OnCheckedChanged="txttungay_TextChanged" Text="Cấp cơ sở"/>
                                    </label>
                                    <label class="checkbox inline">
                                    <asp:CheckBox ID="chkdoancoso" ToolTip="DCS" runat="server" AutoPostBack="true" OnCheckedChanged="txttungay_TextChanged" Text="Cấp đoàn cơ sở"/>
                                    </label>
                                    <label class="checkbox inline">
                                        <asp:CheckBox ID="chkchidoancoso" ToolTip="CDC" runat="server" AutoPostBack="true" OnCheckedChanged="txttungay_TextChanged" Text="Cấp chi đoàn cơ sở"/>
                                    </label>
                                    <label class="checkbox inline">
                                        <asp:CheckBox ID="chkchidoan" ToolTip="CDD" runat="server" AutoPostBack="true" OnCheckedChanged="txttungay_TextChanged" Text="Cấp chi đoàn"/>
                                    </label>
                                </div>
                                <label class="control-label" style="width:150px;padding-right:10px;">Ghi chú</label>
                                <div class="controls">
                                    <asp:TextBox ID="txtGhiChu" runat="server" AutoPostBack="true" OnTextChanged="txttungay_TextChanged" CssClass="span5" TextMode="MultiLine" Height="70px"></asp:TextBox>
                                </div>
                                 <div style="height:5px;"></div>
                                <label class="control-label" style="width:150px;padding-right:10px;"></label>
                                <div class="controls">
                                    <asp:LinkButton ID="btnsave" OnClick="btnsave_Click" class="btn btn-primary"  runat="server" Width="60px"><i class="icon-save"></i>&nbsp;&nbsp;Lưu</asp:LinkButton>
                                    <asp:Label ID="lblstatus" runat="server" ForeColor="Red"></asp:Label>
                                </div>
                                <div style="height:15px;"></div>
                                <span style="font-weight:bold;font-style:italic;color:#0094ff;font-size:1.2em;">Danh sách các lớp đã triển khai</span>
                                <div style="height:5px;"></div>
                                <input id="txtID" runat="server" type="hidden" />
                                <asp:GridView ID="griddslop" runat="server" AutoGenerateColumns="False" Width="100%" EnableTheming="True" CellPadding="4" DataKeyNames="ID" ForeColor="#333333" GridLines="None" OnRowCommand="griddslop_RowCommand">
                                    <AlternatingRowStyle BackColor="White" />
                                    <Columns>
                                        <asp:TemplateField HeaderText="Tên lớp">
                                            <ItemTemplate>
                                                <asp:Label ID="lblMaLopID" runat="server" Text='<%# Bind("MaLop") %>' Visible="false"></asp:Label>
                                                <asp:DropDownList ID="drlXepLoai" runat="server" DataSourceID="source" Enabled="false" CssClass="f" DataValueField="ID" DataTextField="TenChuongTrinh" SelectedValue=<%#Eval("TenLop") %>></asp:DropDownList>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Từ ngày">
                                            <ItemTemplate>
                                                <asp:Label ID="lblTuNgay" runat="server" Text='<%# Bind("TuNgay") %>' Visible="true"></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Đến ngày">
                                            <ItemTemplate>
                                                <asp:Label ID="lblDenNgay" runat="server" Text='<%# Bind("DenNgay") %>' Visible="true"></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center"/>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Ngày khai giảng">
                                            <ItemTemplate>
                                                <asp:Label ID="lblNgayKhaiGiang" runat="server" Text='<%# Bind("NgayKhaiGiang") %>' Visible="true"></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center"/>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Ngày hết hạn đăng ký">
                                            <ItemTemplate>
                                                <asp:Label ID="lblNgayHetHan" runat="server" Text='<%# Bind("NgayHetHanDangKy") %>' Visible="true"></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center"/>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Đối tượng tham gia" Visible="false">
                                            <ItemTemplate>
                                                <asp:Label ID="lblDoiTuongThamGia" runat="server" Text='<%# Bind("DoiTuongThamGia") %>' Visible="true"></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Ghi chú" Visible="false">
                                            <ItemTemplate>
                                                <asp:Label ID="lblGhiChu" runat="server" Text='<%# Bind("GhiChu") %>' Visible="false"></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Xóa">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="LinkButtonxoa" runat="server" CausesValidation="false" 
                                                    CommandName="DeleteLopHoc" CommandArgument='<%#Eval("ID") %>' Text="<i class='icon-remove red'></i> Xóa"></asp:LinkButton>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Xem chi tiết">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="LinkButtonDetail" runat="server" CausesValidation="false" CommandName="XemChiTiet" CommandArgument='<%# ((GridViewRow) Container).RowIndex %>'  
                                                    Text="<i class=icon-file-text-alt></i> Chi tiết"></asp:LinkButton> <%--CommandArgument='<%# ((GridViewRow) Container).RowIndex %>' de lay rowindex--%>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="ItemGridCell" HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <EditRowStyle BackColor="#2461BF" />
                                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                    <RowStyle BackColor="#EFF3FB" />
                                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                    <SortedAscendingCellStyle BackColor="#F5F7FB" />
                                    <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                                    <SortedDescendingCellStyle BackColor="#E9EBEF" />
                                    <SortedDescendingHeaderStyle BackColor="#4870BE" />
                                </asp:GridView>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress runat="server" ID="udtprog" AssociatedUpdatePanelID="udt1">
        <ProgressTemplate>
            <div class="progress">
                <img src="../img/ajax-loader.gif" />
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:ObjectDataSource ID="source" runat="server" SelectMethod="GetListChuongTrinhDaoTao" TypeName="PageURL"></asp:ObjectDataSource>
    <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
    <style type="text/css">
        .f {
            width:100%;
            border:none;
        }
        .span5 {}
    </style>
</asp:Content>

